1. Field of the Invention
Apparatus and methods consistent with the present invention relate to an apparatus and method of recovering a final display, and more particularly, to an apparatus and method of recovering a final display such that second cursor information is constructed by extracting n pieces of iterator information contained in first cursor information in response to a cursor information storage message of a cursor-request message, storing the second cursor information while a portable digital device having an embedded DBMS is in a normal operation, and mapping the n pieces of iterator information contained in the second cursor information to third cursor information by referring to query strings contained in the second cursor information in response to a cursor-information-recovery-request message.
2. Description of the Related Art
With the trends of fabrication of large-capacity storage devices and the proliferation of digital devices using the same, amounts of content stored in and managed by digital devices are rapidly increasing.
In recent years, not only folder-search-based user interfaces (UIs) but also content-search-based UIs have been widely adopted, allowing users of digital devices to effectively utilize a large amount of contents.
To implement a content-search-based UI, a digital device needs to be capable of managing and retrieving metadata for content stored in the digital device. Accordingly, more recently, there has been a growing trend toward portable digital devices employing a DBMS (Database Management System) having data management and storage capabilities.
The DBMS is a program that allows a plurality of users to record data in a database or to access the database to retrieve information stored in the database by providing environments in which convenient data storage and efficient data management can be achieved. In addition, the DBMS integrates remote data by application program, so that each application program can share the integrated data, enabling systematic utilization of information.
The DBMS performs defining of a collected data structure, gathering data according to data structure, data retrieval and renewal using database languages, simultaneous execution control of data processing by multiple users, returning to the original state in the event of an abnormality occurring while renewing data, management of information security, and so on. A typical DBMS is a Relational Database Management System (RDBMS) that uses a Structured Query Language (SQL) interface.
In the case of a portable digital device having an embedded DMBS performing the above-described functions, users of the portable digital device have requested the capability of recovering a final display in the event of a power interruption.
In a general final-display-recovery process, as a portable digital device is supplied with power, a bootloader is executed to drive an operation system. Once the operation system is driven, data acquisition for outputting a display is performed, and then data is output through a display device. Here, the operations of power supply, driving the operation system, execution of the bootloader, and display outputting are performed irrespective of the amount of data (e.g., common content like music, moving images, or images) stored in the digital device. However, in the data acquisition operation, data required for screen display is acquired by allowing the embedded DBMS to execute queries. In the case where the queries for data acquisition are inappropriately processed, the amount of content (target queries) increases, so that a query processing time may linearly increase.
That is, in the case of data acquisition for final data recovery, a query-processing time depends upon the amount of content (target queries).
In a portable digital device having an embedded DBMS that operates normally, predetermined queries are generated for data acquisition so that query processing is performed by the DBMS. Query processing results are accessed by cursor objects. Thus, acquiring data from the normally-operating DBMS means acquiring cursor objects for display output responding to a user input.
That is, in a portable digital device in which power is frequently turned on/off, recovering a final display means recovering a search position of a database when the database search is terminated because a cursor start position when the portable digital device is restarted corresponds to the search position when the database search is terminated.
One approach for recovering a search position is to use a cursor such that the cursor position is stored by storing query strings. Then, the stored query strings are loaded when recovering the cursor position, thereby creating the cursor. Once the cursor is created, the cursor position is moved sequentially while determining whether the position of the cursor created by loading the query strings is identical with a position of the cursor currently in use, thereby recovering the search position.
Such a search-position-recovery scheme may, however, impose several problems. For example, performance degradation due to cursor position movement may be caused as the stored cursor position becomes distant from the current cursor position. Further, as the amount of content of the target queries increases, the recovery time may increase.
Another approach for recovering a search position is to store query results in a disk prior to power interruption of a portable digital device, and recycle the stored query results when restarting the portable digital device. In the related art, query strings are stored when storing a cursor, and a current cursor position is temporarily stored.
For storage of all search results, the cursor is moved to the first cursor position, and search results corresponding to query strings are stored while moving the cursor until the last search result is reached. Once the storage of all search results is completed, the cursor is moved to the current cursor position that is temporarily stored.
Thereafter, when restarting the portable digital device, the search position recovery is performed by loading pre-stored search results stored according to the cursor search results before the cursor is created, and searching for the cursor position based on the loaded search results.
However, this is disadvantageous in that considerable search result storage costs may be involved in a search position storage stage. In order to store all search results in the search position storage stage, data of fields selected while the current cursor is moved throughout all the search results from the first to the last search results should be stored in a separate space. That is, recovery performance is liable to degrade according to the number of times the cursor is moved, the size of data stored, the number of search results, the number of fields selected, and so on.
That is, according to the related art, cursor position storage for final-display recovery and a search position recovery scheme using a re-search method in a search position recovery stage may cause performance degradation due to an increase in the number of times the cursor is moved. Accordingly, as the stored cursor position becomes distant from the first search result, the recovery performance in the search position recovery stage may become very poor. In addition, it is highly probable that the search-position-recovery performance may degrade as the amount of content as target queries.
Still another approach for recovering a search position is to store search results, which, however, also entails several disadvantages. That is, degradation of recovery performance may be caused due to the size of stored data. In addition, an increased number of search results may increase the number of fields selected, which causes an increase in the amount of data stored, unavoidably degrading the performance in the search-position-recovery stage.
The related art search position recovery schemes renders severe degradation in the performance in a search position recovery stage (using a re-search method) or a search position storage stage (using stored search results). Accordingly, a methodology for recovering a search position without performance degradation is needed.